﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace AlbumArtOrganizer.Model
{
    public abstract class Artist : IArtist, INotifyPropertyChanged
    {
        public Artist()
        {
            Albums = new List<IAlbum>();
        }

        public virtual string Name
        {
            get;
            set;
        }

        public virtual ICollection<IAlbum> Albums
        {
            get;
            set;
        }

        public event PropertyChangedEventHandler PropertyChanged;

        void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        bool _isSelected = false;
        public bool IsSelected
        {
            get
            {
                return _isSelected;
            }
            set
            {
                _isSelected = value;
                OnPropertyChanged("IsSelected");
            }
        }
    }
}
